package c.x.jy.dao.dto;

import c.x.jy.common.annotation.SetValue;
import c.x.jy.dao.entity.OrderEntity;
import c.x.jy.dao.entity.OrderItemsEntity;
import c.x.jy.dao.entity.TeacherServiceEntity;
import lombok.Data;

import java.util.List;

@Data
public class OrderEntityDto extends OrderEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@SetValue(beanName = "commonService", method = "selectData", parameter = "SELECT member_id FROM `t_teacher` WHERE id=,#teacherId", vType = String.class)
	private String teacherMemberId;

	@SetValue(beanName = "commonService", method = "selectData", parameter = "SELECT nickname FROM `t_teacher` WHERE id=,#teacherId", vType = String.class)
	private String teacherName;



	@SetValue(beanName = "commonService", method = "selectData", parameter = "SELECT headimgurl FROM `t_member` m left join `t_teacher` t on m.id=t.member_id  WHERE t.id=,#teacherId", vType = String.class)
	private String teacherHeadimgurl;

	@SetValue(beanName = "commonService", method = "selectData", parameter = "SELECT nickname FROM `t_member` WHERE id=,#memberId", vType = String.class)
	private String memberName;

	@SetValue(beanName = "commonService", method = "selectData", parameter = "SELECT headimgurl FROM `t_member` WHERE id=,#memberId", vType = String.class)
	private String memberHeadimgurl;

	@SetValue(beanName = "orderItemsService", method = "goodsByOrder", parameter = "#id", vType = List.class)
	private List<OrderItemsEntity> goods;

	@SetValue(beanName = "commonService", method = "selectData", parameter = "select name from t_business where id=,#businessId", vType = String.class)
	private String businessName;

}
